import { defineStore } from 'pinia'
import { personDetails } from '../../utils/trueType'
export const usePersonDetailsStore = defineStore('personDetails', {
    state: () => ({
        PersonalDetails: {

        } as personDetails,
        PersonalDetailsShow:{} as personDetails,
        imgRow: null as File | null, // ✅ 明确的类型声明
        loading: false,
        imgIsSubmit:false,
    }),
    actions: {
        setPersonalDetails(personDetails:personDetails){
            this.PersonalDetails=personDetails
        },
        changeLoading() {
            this.loading = !this.loading
            setTimeout(() => {
                this.loading = !this.loading
            }, 500);
        },
        setImgIsSubmit(imgIsSubmit:boolean){
            this.imgIsSubmit=imgIsSubmit
        },
    },
    getters: {
        
    },
}
)